package com.app.controller;

import com.app.pojo.Teams;
import com.app.pojo.TeamsOrder;
import com.app.service.TeamsOrderService;
import com.app.service.TeamsService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class TeamsOrderController {
    @Resource
    public TeamsOrderService teamsOrderService;


    //查询所有
    @RequestMapping(value = "/app20/teamboard/list",method = RequestMethod.POST)
    @ResponseBody
    public Map<String,Object> list(){
        Map<String,Object> map = new HashMap<>();
        List<TeamsOrder> teamsOrder = teamsOrderService.list();
        if(teamsOrder != null){
            map.put("success",true);
            map.put("msg","成功");
            map.put("list",teamsOrder);
        }else {
            map.put("success",false);
            map.put("msg","失败");

        }
        return map;
    }






}
